package com.design.pattern.responsibility;

/**
 * @author 王霄
 * @date 2022/3/4 22:31
 */
public class Bank03 extends DefaultBank {

    public Bank03(Bank bank) {
        super(bank);
    }

    @Override
    protected boolean valid(int money) {
        return money >= 200 && money < 300;
    }

    @Override
    public void handler(int money) {
        System.out.println("银行3放款成功，放款金额：" + money);
    }
}
